<#include "../include_page/extendsFieldType.html"/>
<#macro extends name extendList=[]>
<table class="list nowrap itemDetail" addButton="新增扩展字段" width="100%">
	<thead>
		<tr>
			<th type="enum" name="${name}[#index#].inputType" enumUrl="common/extendsFieldType.html" fieldClass="required" size="10">字段类型</th>
			<th type="text" name="${name}[#index#].name" size="10" fieldClass="required" fieldAttrs="{maxlength:20}">名称</th>
			<th type="text" name="${name}[#index#].code" size="20" fieldClass="required alphanumeric">字段名</th>
			<th type="checkbox" name="${name}[#index#].required" size="10">必填</th>
			<th type="text" name="${name}[#index#].defaultValue" size="12">默认值</th>
			<th type="textarea" name="${name}[#index#].description" fieldAttrs="{maxlength:100,rows:2,cols:60}">描述</th>
			<th type="del" width="60">操作</th>
		</tr>
	</thead>
	<tbody>
		<#list extendList as extend>
			<tr>
				<td>
					<input type="hidden" name="${name}[${extend?index}].id" value="${(extend.id)!}"/>
					<@extendsFieldType name+'['+extend?index+'].inputType' extend.inputType/>
				</td>
				<td>
					<input type="text" name="${name}[${extend?index}].name" value="${extend.name?html}" size="10" class="required" maxlength="20"/>
				</td>
				<td>
					<input type="text" name="${name}[${extend?index}].code" value="${extend.code?html}" size="20" class="required alphanumeric"/>
				</td>
				<td>
					<input type="checkbox" name="${name}[${extend?index}].required" ${extend.required?then(' checked="true"','')}/>
				</td>
				<td>
					<input type="text" name="${name}[${extend?index}].defaultValue" value="${(extend.defaultValue?html)!}" size="12"/>
				</td>
				<td>
					<textarea type="text" name="${name}[${extend?index}].description" rows="2" cols="60" maxlength="100"/>${(extend.description?html)!}</textarea>
				</td>
				<td>
					<a href="javascript:void(0)" class="btnDel ">删除</a>
				</td>
			</tr>
		</#list>
	</tbody>
</table>
</#macro>